Skip to content

[fix](be) Avoid local runtime filter merge deadlock#64866

Open
BiteTheDDDDt wants to merge 6 commits into
apache:masterfrom
BiteTheDDDDt:codex/rf-local-merge-locks
Open

[fix](be) Avoid local runtime filter merge deadlock#64866
BiteTheDDDDt wants to merge 6 commits into
apache:masterfrom
BiteTheDDDDt:codex/rf-local-merge-locks

Conversation

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Local runtime filter merge can deadlock when one join build instance publishes a local-merge runtime filter while another instance sends its runtime filter size. The old local merge context lock protected both the merger and the producer list, so one path could hold a producer runtime filter lock and then wait for the context lock while another path held the context lock and then waited for a producer lock.

This change gives RuntimeFilterMerger its own internal synchronization and makes LocalMergeContext expose a snapshot of the merger and producers. Publish, send-size, and sync-size paths take the context lock only while copying that snapshot, then merge filters or update producer sizes outside the context lock. RuntimeFilterMerger returns the ready transition from merge_from directly, removing the separate unlocked ready check.

Release note

None

Check List (For Author)

  • Test: Unit Test
    • build-support/clang-format.sh be/src/exec/runtime_filter/runtime_filter_merger.h be/src/exec/runtime_filter/runtime_filter_mgr.cpp be/src/exec/runtime_filter/runtime_filter_mgr.h be/src/exec/runtime_filter/runtime_filter_producer.cpp be/test/exec/runtime_filter/runtime_filter_merger_test.cpp be/test/exec/runtime_filter/runtime_filter_mgr_test.cpp
    • git diff --cached --check
    • ./run-be-ut.sh --run --filter=RuntimeFilterMgrTest.*
    • ./run-be-ut.sh --run --filter=RuntimeFilterMergerTest.*
  • Behavior changed: No
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Local runtime filter merge can deadlock when one join build instance publishes a local-merge runtime filter while another instance sends its runtime filter size. The old local merge context lock protected both the merger and the producer list, so one path could hold a producer runtime filter lock and then wait for the context lock while another path held the context lock and then waited for a producer lock.

This change gives RuntimeFilterMerger its own internal synchronization and makes LocalMergeContext expose a snapshot of the merger and producers. Publish, send-size, and sync-size paths take the context lock only while copying that snapshot, then merge filters or update producer sizes outside the context lock. RuntimeFilterMerger returns the ready transition from merge_from directly, removing the separate unlocked ready check.

### Release note

None

### Check List (For Author)

- Test: Unit Test
    - build-support/clang-format.sh be/src/exec/runtime_filter/runtime_filter_merger.h be/src/exec/runtime_filter/runtime_filter_mgr.cpp be/src/exec/runtime_filter/runtime_filter_mgr.h be/src/exec/runtime_filter/runtime_filter_producer.cpp be/test/exec/runtime_filter/runtime_filter_merger_test.cpp be/test/exec/runtime_filter/runtime_filter_mgr_test.cpp
    - git diff --cached --check
    - ./run-be-ut.sh --run --filter=RuntimeFilterMgrTest.*
    - ./run-be-ut.sh --run --filter=RuntimeFilterMergerTest.*
- Behavior changed: No
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@BiteTheDDDDt BiteTheDDDDt marked this pull request as ready for review June 25, 2026 15:06
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review summary for PR #64866

I reviewed the runtime-filter merger/producer/manager changes and the adjacent runtime-filter tests. I did not find a substantiated issue that should be raised as an inline review comment.

Critical checkpoints:

  • Goal/test: the change targets the local runtime-filter merge deadlock by moving producer/merger work out of LocalMergeContext locking and synchronizing RuntimeFilterMerger internally. The updated BE UTs cover the adjusted merger readiness and manager API behavior. I could not run BE UTs locally because thirdparty/installed is missing in this checkout.
  • Scope/clarity: the patch is focused on runtime-filter locking, snapshots, and related unit-test updates.
  • Concurrency/lifecycle: I checked producer publish()/send_size(), local snapshots, merger locking, global merge reset, and recursive CTE reset/rebuild sequencing. I did not find a new lock-order cycle or a substantiated stale-stage publication issue.
  • Config/compatibility: no new config was added; the runtime-filter stage fields used on RPCs are existing optional protobuf fields.
  • Parallel paths: local-only, local-merge, remote merge, size-sync, stale recursive-CTE RPC handling, and local consumer signaling paths were reviewed.
  • Tests/style: git diff --check passed, and build-support/check-format.sh passed when clang-format 16 was selected in PATH. BE UT execution was not possible locally because the checkout lacks thirdparty/installed.

Subagent conclusions:

  • optimizer-rewrite proposed OPT-1 about stale recursive-CTE local publication. I dismissed it with lifecycle evidence: WAIT_FOR_DESTROY completes old PFC teardown before REBUILD registers new-stage consumers/producers, while remote stale messages are stage-checked.
  • tests-session-config reported no candidates.
  • Convergence round 1 ended with both live subagents reporting NO_NEW_VALUABLE_FINDINGS for the final no-inline-comment set.

User focus: no additional user-provided review focus was supplied.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 28845 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 931224834fd4f7e16e8e35d42aacf6f6f41f6015, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17689	4189	4003	4003
q2	2007	322	185	185
q3	10376	1391	830	830
q4	4681	469	340	340
q5	7486	866	582	582
q6	186	175	139	139
q7	769	847	625	625
q8	9427	1520	1519	1519
q9	5874	4510	4494	4494
q10	6741	1814	1541	1541
q11	438	270	241	241
q12	626	416	294	294
q13	18125	3447	2778	2778
q14	286	269	251	251
q15	q16	796	774	708	708
q17	1156	925	886	886
q18	6944	5743	5477	5477
q19	1239	1263	985	985
q20	506	397	263	263
q21	5738	2693	2400	2400
q22	439	359	304	304
Total cold run time: 101529 ms
Total hot run time: 28845 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4339	4267	4266	4266
q2	315	338	224	224
q3	4612	4944	4436	4436
q4	2071	2175	1375	1375
q5	4465	4323	4320	4320
q6	239	183	129	129
q7	1754	1643	1813	1643
q8	2550	2162	2185	2162
q9	8086	8126	8055	8055
q10	4814	4743	4294	4294
q11	599	418	387	387
q12	740	749	542	542
q13	3341	3479	2986	2986
q14	299	319	294	294
q15	q16	709	727	651	651
q17	1338	1326	1328	1326
q18	8060	7429	7156	7156
q19	1139	1108	1122	1108
q20	2291	2250	1948	1948
q21	5312	4593	4455	4455
q22	510	451	400	400
Total cold run time: 57583 ms
Total hot run time: 52157 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 173691 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 931224834fd4f7e16e8e35d42aacf6f6f41f6015, data reload: false

query5	4347	628	497	497
query6	437	186	183	183
query7	4821	559	310	310
query8	321	193	181	181
query9	8764	4137	4109	4109
query10	436	314	265	265
query11	5875	2364	2154	2154
query12	156	101	104	101
query13	1319	599	446	446
query14	6181	5400	5105	5105
query14_1	4429	4391	4361	4361
query15	216	208	175	175
query16	996	460	456	456
query17	1105	706	578	578
query18	2446	474	337	337
query19	200	184	145	145
query20	113	108	105	105
query21	214	147	123	123
query22	13650	13537	13376	13376
query23	17407	16607	16184	16184
query23_1	16298	16240	16213	16213
query24	7481	1779	1302	1302
query24_1	1340	1320	1322	1320
query25	550	443	372	372
query26	1332	320	174	174
query27	2714	556	351	351
query28	4484	2026	1981	1981
query29	1081	624	484	484
query30	322	243	199	199
query31	1112	1094	954	954
query32	101	61	58	58
query33	529	323	252	252
query34	1184	1159	649	649
query35	787	784	688	688
query36	1380	1405	1236	1236
query37	158	109	108	108
query38	1915	1720	1692	1692
query39	937	932	894	894
query39_1	870	878	888	878
query40	222	127	107	107
query41	86	70	70	70
query42	97	90	88	88
query43	331	343	296	296
query44	1428	814	799	799
query45	205	215	192	192
query46	1094	1236	758	758
query47	2364	2307	2231	2231
query48	398	420	288	288
query49	580	426	321	321
query50	986	345	265	265
query51	4589	4423	4384	4384
query52	87	84	72	72
query53	263	277	192	192
query54	283	234	219	219
query55	76	79	69	69
query56	243	236	245	236
query57	1416	1428	1329	1329
query58	256	228	226	226
query59	1657	1748	1509	1509
query60	305	262	246	246
query61	177	179	176	176
query62	696	656	592	592
query63	231	195	214	195
query64	2561	807	647	647
query65	4899	4806	4828	4806
query66	1821	523	331	331
query67	28828	28813	28741	28741
query68	3120	1511	974	974
query69	423	305	277	277
query70	1114	972	957	957
query71	288	238	213	213
query72	2902	2636	2302	2302
query73	862	765	422	422
query74	5098	4952	4754	4754
query75	2566	2553	2209	2209
query76	2318	1237	809	809
query77	354	396	293	293
query78	12489	12577	11756	11756
query79	1395	1254	797	797
query80	586	459	388	388
query81	452	279	242	242
query82	581	168	120	120
query83	360	295	265	265
query84	263	145	115	115
query85	846	552	417	417
query86	359	292	289	289
query87	1856	1863	1773	1773
query88	3728	2786	2790	2786
query89	427	388	348	348
query90	1951	185	188	185
query91	174	166	131	131
query92	60	62	56	56
query93	1603	1546	901	901
query94	557	359	318	318
query95	705	474	349	349
query96	1116	825	340	340
query97	2689	2700	2568	2568
query98	214	211	202	202
query99	1191	1149	1021	1021
Total cold run time: 257253 ms
Total hot run time: 173691 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.24 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 931224834fd4f7e16e8e35d42aacf6f6f41f6015, data reload: false

query1	0.01	0.01	0.00
query2	0.09	0.05	0.06
query3	0.25	0.14	0.14
query4	1.62	0.13	0.13
query5	0.24	0.23	0.23
query6	1.25	1.06	1.02
query7	0.03	0.00	0.01
query8	0.10	0.04	0.04
query9	0.38	0.31	0.32
query10	0.57	0.55	0.54
query11	0.18	0.15	0.15
query12	0.19	0.14	0.14
query13	0.48	0.47	0.48
query14	1.02	1.01	1.00
query15	0.61	0.59	0.60
query16	0.32	0.31	0.30
query17	1.10	1.11	1.12
query18	0.22	0.22	0.20
query19	1.99	1.94	1.98
query20	0.02	0.01	0.01
query21	15.42	0.23	0.13
query22	4.84	0.05	0.05
query23	16.14	0.32	0.12
query24	2.95	0.41	0.34
query25	0.12	0.05	0.05
query26	0.71	0.20	0.14
query27	0.04	0.04	0.03
query28	3.55	0.96	0.54
query29	12.44	4.32	3.46
query30	0.27	0.15	0.15
query31	2.77	0.60	0.32
query32	3.21	0.59	0.49
query33	3.24	3.23	3.32
query34	16.04	4.25	3.52
query35	3.52	3.56	3.53
query36	0.54	0.44	0.43
query37	0.09	0.07	0.06
query38	0.04	0.04	0.03
query39	0.04	0.03	0.03
query40	0.17	0.15	0.16
query41	0.10	0.03	0.02
query42	0.04	0.02	0.03
query43	0.04	0.04	0.03
Total cold run time: 96.99 s
Total hot run time: 25.24 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 95.92% (94/98) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.20% (28463/38361)
Line Coverage 58.05% (310076/534137)
Region Coverage 54.71% (258946/473277)
Branch Coverage 56.09% (112577/200695)

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review summary for PR #64866.

I reviewed the six changed runtime-filter files and the relevant producer/helper, manager, pipeline prepare/submit, recursive CTE rerun, and sync/publish paths. I did not find a substantiated issue requiring an inline review comment.

Critical checkpoint conclusions:

  • Goal: the PR targets a local runtime filter merge deadlock by moving merge/size work out from the old context lock and giving RuntimeFilterMerger its own synchronization. The changed merge_from(..., &ready), size aggregation, shared context lookup, and producer publish/send-size call sites are consistent with that goal.
  • Scope and focus: the change is confined to BE runtime-filter manager/producer/merger code and matching BE unit-test API updates.
  • Concurrency/lifecycle: I specifically checked producer registration, send-size, publish, global merge, and recursive CTE stage reset ordering. Producer registration happens during task prepare before fragment submit; parallel prepare waits for all instances; recursive CTE runs WAIT_FOR_DESTROY -> reset_global_rf -> REBUILD/prepare -> SUBMIT; stale-stage requests are filtered through stage checks. I did not find an executable same-stage registration/read race in the reviewed paths.
  • Configuration, protocol, storage, persistence: no new config, thrift/protobuf field, storage format, or persistence behavior is introduced.
  • Parallel paths: local merge publish, local size sync, and global merge-controller merge paths were updated to use the new ready transition. I did not find a missed parallel runtime-filter path in the changed surface.
  • Tests: the PR updates BE unit tests for the new merge_from ready result and local merge context API. I could not run BE UT in this checkout because thirdparty/installed is absent. I did run git diff --check on the exact PR range, and it passed.
  • Observability/security: no security-sensitive path is changed; debug output is preserved through the new LocalMergeContext::debug_string() path.
  • User focus: no additional user-provided review focus was supplied.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/rewrite or runtime-filter semantic regression found.
  • tests-session-config: raised TEST-1 about unsynchronized LocalMergeContext::producers reads. I dismissed it with lifecycle evidence above; it remains a useful concurrent-regression test gap but not a substantiated inline issue.
  • Convergence round 1 ended with both live subagents reporting NO_NEW_VALUABLE_FINDINGS for the same ledger and empty proposed inline comment set.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29309 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit e41df92c573a1d85a6590ea49bff4d83ac4bdd9b, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17783	4154	4058	4058
q2	2007	329	190	190
q3	10306	1510	845	845
q4	4685	472	353	353
q5	7512	879	572	572
q6	183	172	136	136
q7	798	914	624	624
q8	9353	1521	1516	1516
q9	5597	4519	4554	4519
q10	6744	1795	1525	1525
q11	439	277	245	245
q12	628	416	301	301
q13	18099	3292	2829	2829
q14	261	258	245	245
q15	q16	795	772	717	717
q17	1019	1008	999	999
q18	7013	5739	5639	5639
q19	1192	1286	1013	1013
q20	506	413	277	277
q21	5668	2655	2399	2399
q22	435	360	307	307
Total cold run time: 101023 ms
Total hot run time: 29309 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4420	4330	4314	4314
q2	317	355	229	229
q3	4584	5040	4377	4377
q4	2379	2166	1384	1384
q5	4479	4339	4339	4339
q6	231	174	131	131
q7	1772	1663	2056	1663
q8	2625	2213	2214	2213
q9	8410	8513	8239	8239
q10	4808	4863	4304	4304
q11	568	411	375	375
q12	772	767	543	543
q13	3334	3522	2993	2993
q14	284	297	282	282
q15	q16	719	736	649	649
q17	1350	1339	1577	1339
q18	7952	7339	7302	7302
q19	1191	1086	1135	1086
q20	2300	2236	1981	1981
q21	5325	4658	4571	4571
q22	511	468	391	391
Total cold run time: 58331 ms
Total hot run time: 52705 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 171988 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit e41df92c573a1d85a6590ea49bff4d83ac4bdd9b, data reload: false

query5	4321	636	516	516
query6	439	194	166	166
query7	4914	532	307	307
query8	324	183	162	162
query9	8747	4068	4104	4068
query10	417	331	264	264
query11	5860	2359	2166	2166
query12	161	102	100	100
query13	1250	642	440	440
query14	6244	5337	5010	5010
query14_1	4358	4314	4333	4314
query15	207	199	180	180
query16	994	436	417	417
query17	1100	702	550	550
query18	2423	466	336	336
query19	196	180	150	150
query20	107	103	110	103
query21	211	138	117	117
query22	13813	13648	13493	13493
query23	17399	16507	16048	16048
query23_1	16211	16386	16268	16268
query24	7803	1759	1284	1284
query24_1	1309	1296	1293	1293
query25	536	447	371	371
query26	1328	328	176	176
query27	2632	565	352	352
query28	4439	2047	2030	2030
query29	1072	619	507	507
query30	311	229	205	205
query31	1131	1087	972	972
query32	114	65	63	63
query33	539	330	262	262
query34	1163	1202	656	656
query35	769	785	670	670
query36	1394	1460	1285	1285
query37	164	110	98	98
query38	1900	1723	1663	1663
query39	944	926	896	896
query39_1	878	876	868	868
query40	231	127	107	107
query41	70	75	68	68
query42	91	90	89	89
query43	326	332	283	283
query44	1450	806	807	806
query45	209	195	182	182
query46	1071	1226	762	762
query47	2349	2336	2198	2198
query48	412	441	291	291
query49	587	441	320	320
query50	969	352	263	263
query51	4406	4389	4379	4379
query52	84	85	72	72
query53	258	268	197	197
query54	283	232	214	214
query55	76	74	68	68
query56	274	246	238	238
query57	1455	1407	1304	1304
query58	247	231	221	221
query59	1589	1635	1468	1468
query60	287	264	291	264
query61	150	145	155	145
query62	697	641	582	582
query63	226	193	206	193
query64	2570	784	592	592
query65	4867	4786	4754	4754
query66	1825	446	342	342
query67	29029	28887	28749	28749
query68	3132	1590	1007	1007
query69	407	303	264	264
query70	1068	970	967	967
query71	300	232	211	211
query72	2937	2652	2386	2386
query73	840	777	426	426
query74	5120	4970	4797	4797
query75	2580	2548	2173	2173
query76	2305	1164	780	780
query77	365	405	284	284
query78	12463	12376	12067	12067
query79	1440	1207	807	807
query80	736	464	392	392
query81	478	275	237	237
query82	568	153	119	119
query83	345	286	256	256
query84	266	146	115	115
query85	888	513	413	413
query86	409	304	273	273
query87	1855	1833	1779	1779
query88	3768	2839	2799	2799
query89	427	387	344	344
query90	1788	175	179	175
query91	173	162	132	132
query92	62	61	54	54
query93	1586	1435	914	914
query94	618	349	338	338
query95	668	373	430	373
query96	1047	820	341	341
query97	2705	2662	2564	2564
query98	215	241	209	209
query99	1201	1151	1046	1046
Total cold run time: 257138 ms
Total hot run time: 171988 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.22 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit e41df92c573a1d85a6590ea49bff4d83ac4bdd9b, data reload: false

query1	0.00	0.00	0.01
query2	0.10	0.05	0.05
query3	0.25	0.13	0.12
query4	1.62	0.15	0.18
query5	0.24	0.22	0.22
query6	1.25	1.08	1.08
query7	0.04	0.01	0.00
query8	0.06	0.04	0.03
query9	0.38	0.36	0.31
query10	0.54	0.53	0.54
query11	0.19	0.15	0.15
query12	0.19	0.16	0.15
query13	0.48	0.47	0.49
query14	1.00	1.00	1.00
query15	0.61	0.59	0.61
query16	0.33	0.32	0.33
query17	1.10	1.11	1.11
query18	0.23	0.21	0.22
query19	1.97	1.88	2.01
query20	0.01	0.02	0.01
query21	15.51	0.24	0.13
query22	4.60	0.05	0.05
query23	16.13	0.30	0.13
query24	3.03	0.41	0.32
query25	0.10	0.05	0.06
query26	0.74	0.22	0.14
query27	0.05	0.03	0.04
query28	3.48	0.93	0.54
query29	12.56	4.24	3.47
query30	0.27	0.14	0.16
query31	2.78	0.62	0.31
query32	3.22	0.61	0.49
query33	3.21	3.21	3.30
query34	15.58	4.24	3.54
query35	3.56	3.52	3.53
query36	0.56	0.45	0.41
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.03
query40	0.17	0.16	0.15
query41	0.09	0.03	0.02
query42	0.04	0.03	0.02
query43	0.04	0.04	0.04
Total cold run time: 96.47 s
Total hot run time: 25.22 s

Comment thread be/src/exec/runtime_filter/runtime_filter_mgr.cpp Outdated
Comment thread be/src/exec/runtime_filter/runtime_filter_mgr.cpp Outdated
@yiguolei yiguolei added usercase Important user case type label p0_b labels Jun 26, 2026
@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 59.76% (49/82) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 54.88% (21596/39350)
Line Coverage 38.40% (206506/537725)
Region Coverage 34.48% (162527/471367)
Branch Coverage 35.49% (71168/200537)

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29536 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 7d55640cc36903ac0028744526361fccf067a6ec, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17627	4267	4249	4249
q2	2047	326	189	189
q3	10258	1484	865	865
q4	4683	471	335	335
q5	7514	848	579	579
q6	189	171	142	142
q7	816	866	625	625
q8	9366	1683	1599	1599
q9	5617	4528	4503	4503
q10	6786	1774	1515	1515
q11	438	283	247	247
q12	634	433	300	300
q13	18091	3539	2814	2814
q14	274	260	240	240
q15	q16	790	777	714	714
q17	1037	996	982	982
q18	7241	5857	5582	5582
q19	1320	1349	1134	1134
q20	484	415	266	266
q21	5931	2672	2354	2354
q22	453	375	302	302
Total cold run time: 101596 ms
Total hot run time: 29536 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4510	4440	4504	4440
q2	324	354	239	239
q3	4632	4980	4457	4457
q4	2091	2195	1394	1394
q5	4495	4401	4383	4383
q6	235	179	132	132
q7	1888	2143	1783	1783
q8	2721	2331	2399	2331
q9	8492	8182	8241	8182
q10	4827	4793	4319	4319
q11	604	418	394	394
q12	758	780	532	532
q13	3259	3765	2995	2995
q14	311	301	278	278
q15	q16	730	747	662	662
q17	1401	1361	1364	1361
q18	8194	7468	7366	7366
q19	1218	1108	1099	1099
q20	2224	2229	1956	1956
q21	5339	4726	4643	4643
q22	542	465	406	406
Total cold run time: 58795 ms
Total hot run time: 53352 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 171619 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 7d55640cc36903ac0028744526361fccf067a6ec, data reload: false

query5	4338	628	469	469
query6	446	191	170	170
query7	4817	554	318	318
query8	333	186	170	170
query9	8763	4015	4006	4006
query10	451	313	258	258
query11	5966	2356	2152	2152
query12	157	103	106	103
query13	1312	641	428	428
query14	6291	5218	4947	4947
query14_1	4265	4252	4273	4252
query15	211	197	179	179
query16	991	455	429	429
query17	946	677	566	566
query18	2427	464	330	330
query19	202	179	141	141
query20	111	110	103	103
query21	234	134	114	114
query22	13605	13598	13461	13461
query23	17351	16699	16148	16148
query23_1	16369	16270	16195	16195
query24	7581	1780	1300	1300
query24_1	1330	1339	1314	1314
query25	572	478	398	398
query26	1301	334	167	167
query27	2672	559	350	350
query28	4531	2050	2048	2048
query29	1109	625	500	500
query30	313	240	203	203
query31	1113	1080	958	958
query32	113	62	63	62
query33	536	336	274	274
query34	1188	1166	651	651
query35	795	786	670	670
query36	1375	1458	1254	1254
query37	159	111	95	95
query38	1900	1719	1680	1680
query39	936	920	890	890
query39_1	863	876	870	870
query40	230	127	104	104
query41	75	69	70	69
query42	92	88	87	87
query43	322	323	282	282
query44	1467	801	792	792
query45	215	198	179	179
query46	1130	1213	736	736
query47	2362	2355	2256	2256
query48	394	392	308	308
query49	633	439	334	334
query50	1000	367	268	268
query51	4402	4340	4391	4340
query52	85	84	73	73
query53	258	264	193	193
query54	287	237	214	214
query55	80	73	71	71
query56	265	237	238	237
query57	1465	1399	1331	1331
query58	257	229	221	221
query59	1590	1618	1428	1428
query60	337	254	239	239
query61	179	172	210	172
query62	685	651	589	589
query63	228	191	195	191
query64	2546	769	598	598
query65	4871	4797	4749	4749
query66	1787	468	344	344
query67	28978	28774	28646	28646
query68	3087	1592	973	973
query69	407	303	269	269
query70	1041	956	945	945
query71	295	238	206	206
query72	2946	2599	2380	2380
query73	849	778	420	420
query74	5130	4938	4719	4719
query75	2583	2570	2165	2165
query76	2319	1206	799	799
query77	350	368	276	276
query78	12409	12266	11793	11793
query79	1366	1142	780	780
query80	1302	466	415	415
query81	508	278	245	245
query82	569	153	122	122
query83	359	271	245	245
query84	305	148	115	115
query85	920	553	417	417
query86	416	301	301	301
query87	1864	1840	1785	1785
query88	3671	2771	2772	2771
query89	424	386	352	352
query90	1897	178	178	178
query91	174	157	132	132
query92	63	62	57	57
query93	1491	1454	896	896
query94	755	354	311	311
query95	695	480	367	367
query96	1075	798	360	360
query97	2686	2689	2555	2555
query98	215	227	196	196
query99	1207	1165	1054	1054
Total cold run time: 257899 ms
Total hot run time: 171619 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.3 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 7d55640cc36903ac0028744526361fccf067a6ec, data reload: false

query1	0.01	0.01	0.00
query2	0.10	0.05	0.06
query3	0.25	0.14	0.14
query4	1.61	0.14	0.17
query5	0.24	0.23	0.23
query6	1.28	1.08	1.01
query7	0.03	0.00	0.00
query8	0.06	0.04	0.04
query9	0.38	0.31	0.33
query10	0.56	0.56	0.56
query11	0.19	0.15	0.15
query12	0.18	0.15	0.14
query13	0.49	0.48	0.49
query14	1.02	1.03	1.02
query15	0.62	0.60	0.60
query16	0.34	0.34	0.34
query17	1.17	1.12	1.16
query18	0.22	0.21	0.20
query19	2.03	1.94	2.00
query20	0.02	0.01	0.01
query21	15.49	0.25	0.15
query22	4.74	0.04	0.05
query23	16.13	0.31	0.13
query24	3.05	0.40	0.32
query25	0.12	0.05	0.04
query26	0.75	0.20	0.14
query27	0.04	0.04	0.04
query28	3.51	0.89	0.55
query29	12.54	4.36	3.47
query30	0.26	0.15	0.16
query31	2.78	0.61	0.31
query32	3.21	0.62	0.49
query33	3.16	3.27	3.19
query34	15.47	4.28	3.52
query35	3.60	3.49	3.56
query36	0.56	0.43	0.43
query37	0.09	0.07	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.17	0.15
query41	0.09	0.04	0.03
query42	0.04	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 96.75 s
Total hot run time: 25.3 s

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review summary for PR #64866.

I found one issue: the changed unit tests do not cover the nonzero recursive-stage local merge path that the production change now relies on for context replacement and stale-stage filtering.

Critical checkpoint conclusions:

  • Goal/test: the production change addresses local runtime-filter merge synchronization and recursive-stage stale filtering. Merger readiness, manager API renaming, and default stage-0 behavior are covered, but nonzero-stage local merge replacement/stale filtering is not covered.
  • Scope/clarity: the patch is focused on BE runtime-filter manager/producer/merger code and matching BE unit-test API updates.
  • Concurrency/lifecycle: I checked local merge registration, publish, send-size, sync-size, global merge reset, PipelineFragmentContext prepare/submit ordering, and recursive CTE WAIT_FOR_DESTROY -> reset_global_rf -> REBUILD -> SUBMIT ordering. The producer-vector synchronization notes overlap the existing inline thread and are not submitted again.
  • Config/compatibility/persistence/storage: no new config, storage format, persistence, or FE-BE protocol field is introduced by this PR.
  • Parallel paths: local merge publish, local size sync, global merge, stale-stage RPC checks, hash join and set sink runtime-filter paths were reviewed.
  • Tests/style: exact-range git diff --check passed locally. I did not run BE UTs because this checkout lacks thirdparty/installed; local clang-format validation was also not run because only clang-format 18 is available and Doris requires v16. Current GitHub status contexts show BE UT and compile success on the head; the failed macOS BE UT check exits early because the runner has Java 25 instead of JDK 17.
  • Observability/security: no security-sensitive behavior is changed; debug output is preserved through LocalMergeContext::debug_string().

Subagent conclusions:

  • optimizer-rewrite: OPT-1 was treated as duplicate of the existing producer-vector synchronization thread; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.
  • tests-session-config: TSC-1 was merged as the same duplicate synchronization point; TSC-2 became the single inline test-coverage comment; convergence round 1 returned NO_NEW_VALUABLE_FINDINGS.

User focus: no additional user-provided review focus was supplied.

Comment thread be/test/exec/runtime_filter/runtime_filter_mgr_test.cpp
Comment thread be/src/exec/runtime_filter/runtime_filter_mgr.cpp Outdated
Comment thread be/src/exec/runtime_filter/runtime_filter_mgr.cpp Outdated
Comment thread be/src/exec/runtime_filter/runtime_filter_mgr.cpp Outdated
### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary: Local runtime filter merge context replacement used a reference to the map entry, making it unclear whether a recursive CTE stage reset replaced the shared context or mutated a context visible through existing shared_ptr owners. This change explicitly inserts or assigns a new LocalMergeContext when a newer stage registers, and removes the extra LocalMergeContext debug string snapshot so debug output stays close to the existing manager-level format.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - python3 build-support/run_clang_format.py --clang-format-executable /mnt/disk6/common/ldb_toolchain_toucan/bin/clang-format --style file --inplace true be/src/exec/runtime_filter/runtime_filter_mgr.cpp be/src/exec/runtime_filter/runtime_filter_mgr.h
    - git diff --check -- be/src/exec/runtime_filter/runtime_filter_mgr.cpp be/src/exec/runtime_filter/runtime_filter_mgr.h
- Behavior changed: No
- Does this need documentation: No
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review result: found one additional blocking issue.

Critical checkpoints:

  • Goal/test: the PR addresses local runtime-filter merge/context handling; current tests cover basic manager and merger paths, while the missing nonzero recursive-stage test is already covered by existing thread discussion_r3487509240.
  • Concurrency/lifecycle: prepare-before-submit and recursive CTE WAIT_FOR_DESTROY -> REBUILD -> SUBMIT ordering make the producer-vector race unsubstantiated, but the current debug path still has a concrete manager-lock / producer-lock inversion; see inline comment.
  • Config/protocol/compatibility: no new config item or mixed-version protocol issue found; stage propagation through merge/size/publish paths was reviewed.
  • Parallel paths: local/global merge publish and size-sync paths were reviewed; no additional semantic issue found beyond the inline comment and existing test-coverage thread.
  • Tests/validation: exact-range git diff --check passed. Targeted BE UT execution did not reach the tests because run-be-ut failed during gensrc setup: thirdparty/installed/bin/protoc is missing. GitHub formatter checks are green in the current PR status.
  • User focus: no additional user-provided focus was present.

Subagent conclusions: optimizer-rewrite candidate OPT-1 was verified and became MAIN-1, the single inline comment. tests-session-config reported no new valuable findings. The existing nonzero-stage coverage concern was treated as duplicate of discussion_r3487509240, and the producer-vector race was dismissed with lifecycle evidence. Convergence round 1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same current ledger/comment set.

Comment thread be/src/exec/runtime_filter/runtime_filter_mgr.cpp Outdated
yiguolei
yiguolei previously approved these changes Jun 29, 2026
@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 82.09% (55/67) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 54.92% (21608/39346)
Line Coverage 38.40% (206393/537442)
Region Coverage 34.47% (162444/471237)
Branch Coverage 35.50% (71145/200431)

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29344 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 932b37e229c516b04745b3cb3c9596b64a58bd19, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17593	4097	4056	4056
q2	2051	315	198	198
q3	10340	1434	826	826
q4	4686	469	342	342
q5	7571	854	585	585
q6	182	170	138	138
q7	809	872	641	641
q8	9478	1658	1545	1545
q9	5593	4568	4556	4556
q10	6766	1833	1541	1541
q11	446	280	247	247
q12	650	426	320	320
q13	18097	3430	2755	2755
q14	273	260	239	239
q15	q16	789	787	711	711
q17	1004	971	1033	971
q18	7155	5807	5591	5591
q19	1332	1265	1082	1082
q20	492	415	269	269
q21	5867	2663	2427	2427
q22	444	368	304	304
Total cold run time: 101618 ms
Total hot run time: 29344 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4323	4294	4260	4260
q2	313	351	224	224
q3	4584	4998	4427	4427
q4	2118	2173	1376	1376
q5	4429	4302	4289	4289
q6	236	181	134	134
q7	1714	1904	1840	1840
q8	2558	2265	2217	2217
q9	8313	8449	8108	8108
q10	4819	4814	4303	4303
q11	584	466	400	400
q12	741	779	540	540
q13	3334	3645	2962	2962
q14	284	299	278	278
q15	q16	754	726	639	639
q17	1374	1445	1484	1445
q18	8230	7330	7367	7330
q19	1182	1093	1122	1093
q20	2235	2291	1944	1944
q21	5276	4647	4439	4439
q22	515	445	409	409
Total cold run time: 57916 ms
Total hot run time: 52657 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 172292 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 932b37e229c516b04745b3cb3c9596b64a58bd19, data reload: false

query5	4318	627	514	514
query6	424	190	182	182
query7	4881	557	327	327
query8	331	183	168	168
query9	8794	4057	4084	4057
query10	465	305	270	270
query11	5901	2359	2187	2187
query12	156	106	101	101
query13	1324	608	442	442
query14	6298	5308	4983	4983
query14_1	4284	4255	4288	4255
query15	211	203	181	181
query16	1009	456	440	440
query17	925	699	569	569
query18	2407	457	339	339
query19	194	180	137	137
query20	109	103	105	103
query21	222	133	119	119
query22	13620	13628	13494	13494
query23	17294	16508	16214	16214
query23_1	16314	16356	16331	16331
query24	7506	1755	1301	1301
query24_1	1323	1314	1306	1306
query25	536	438	359	359
query26	1291	336	182	182
query27	2670	582	352	352
query28	4509	2042	2052	2042
query29	1120	662	508	508
query30	297	240	199	199
query31	1121	1088	957	957
query32	110	64	63	63
query33	525	335	266	266
query34	1186	1136	653	653
query35	792	794	694	694
query36	1399	1376	1212	1212
query37	163	108	92	92
query38	1885	1728	1693	1693
query39	940	943	905	905
query39_1	874	877	889	877
query40	227	124	105	105
query41	73	70	70	70
query42	93	91	92	91
query43	328	325	287	287
query44	1429	781	792	781
query45	201	191	186	186
query46	1135	1212	792	792
query47	2441	2366	2221	2221
query48	410	420	298	298
query49	592	430	329	329
query50	1018	351	263	263
query51	4457	4457	4361	4361
query52	87	84	71	71
query53	255	270	198	198
query54	295	231	211	211
query55	77	73	68	68
query56	257	238	237	237
query57	1441	1428	1332	1332
query58	249	223	230	223
query59	1563	1639	1461	1461
query60	305	259	240	240
query61	181	175	177	175
query62	693	649	600	600
query63	234	200	195	195
query64	2587	735	607	607
query65	4855	4801	4763	4763
query66	1808	470	334	334
query67	28962	29025	28746	28746
query68	3184	1473	889	889
query69	405	298	270	270
query70	1066	994	958	958
query71	295	239	218	218
query72	2974	2619	2321	2321
query73	806	803	412	412
query74	5151	4961	4769	4769
query75	2584	2578	2167	2167
query76	2348	1207	809	809
query77	334	378	283	283
query78	12545	12515	11924	11924
query79	1425	1127	767	767
query80	1253	470	393	393
query81	519	282	238	238
query82	623	160	120	120
query83	324	277	249	249
query84	308	142	115	115
query85	911	510	410	410
query86	418	301	280	280
query87	1850	1840	1759	1759
query88	3731	2812	2793	2793
query89	426	392	340	340
query90	1875	182	191	182
query91	172	162	130	130
query92	62	61	57	57
query93	1607	1503	849	849
query94	705	331	319	319
query95	682	383	340	340
query96	1099	768	336	336
query97	2713	2676	2553	2553
query98	222	209	197	197
query99	1196	1179	1029	1029
Total cold run time: 258010 ms
Total hot run time: 172292 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.16 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 932b37e229c516b04745b3cb3c9596b64a58bd19, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.05	0.05
query3	0.25	0.13	0.13
query4	1.61	0.14	0.13
query5	0.24	0.22	0.22
query6	1.24	1.04	1.09
query7	0.04	0.00	0.00
query8	0.06	0.04	0.04
query9	0.38	0.30	0.33
query10	0.55	0.56	0.55
query11	0.19	0.14	0.14
query12	0.19	0.15	0.14
query13	0.47	0.49	0.48
query14	1.02	1.00	1.01
query15	0.61	0.59	0.62
query16	0.30	0.34	0.32
query17	1.08	1.12	1.10
query18	0.23	0.20	0.21
query19	2.04	1.89	1.91
query20	0.01	0.01	0.01
query21	15.55	0.22	0.13
query22	4.83	0.05	0.04
query23	16.14	0.30	0.12
query24	2.98	0.41	0.31
query25	0.12	0.05	0.04
query26	0.73	0.21	0.17
query27	0.06	0.04	0.03
query28	3.59	0.88	0.52
query29	12.52	4.32	3.47
query30	0.27	0.15	0.17
query31	2.77	0.59	0.32
query32	3.22	0.60	0.49
query33	3.28	3.22	3.20
query34	15.65	4.25	3.52
query35	3.50	3.53	3.55
query36	0.54	0.44	0.42
query37	0.09	0.06	0.06
query38	0.04	0.03	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.14
query41	0.08	0.03	0.04
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.88 s
Total hot run time: 25.16 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 89.55% (60/67) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.12% (28465/38404)
Line Coverage 57.98% (309776/534253)
Region Coverage 54.66% (258711/473342)
Branch Coverage 56.03% (112429/200674)

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Jun 29, 2026
@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one compile-blocking issue in the changed runtime-filter unit tests. The production API was renamed to increase_expected_producer_num(...), but RuntimeFilterMergerTest still calls the removed set_expected_producer_num(...) helper in four places.

Checkpoint conclusions: the PR goal is clear and the production change is focused on runtime-filter local/global merge locking and recursive-stage filtering; the changed code generally follows the intended lock-order direction by avoiding manager-lock calls into runtime-filter objects. The main remaining blocker is test/build correctness. Concurrency/lifecycle around recursive CTE stage reset was reviewed, including WAIT_FOR_DESTROY -> reset_global_rf -> REBUILD -> SUBMIT and the deferred close guard; I did not find a new substantiated runtime lifecycle issue beyond the existing open stage-coverage and debug-lock comments. No new config, persistence, storage format, FE/BE protocol field, or observability requirement was introduced beyond the stage fields already being propagated in runtime-filter RPCs. Test coverage is still partially covered by existing review thread discussion_r3487509240 for nonzero-stage/stale-stage behavior, and this review adds the separate compile blocker below.

Validation: git diff --check passed for the changed file set. Local BE UT execution was not available because this checkout is missing thirdparty/installed. The current macOS BE UT GitHub check failed before compilation due runner Java 25 vs required JDK 17, so it did not independently validate this compile issue.

User focus: no additional user-provided review focus was supplied.

Subagent conclusions: tests-session-config reported TSC-001, accepted here as the inline comment, and TSC-DUP-001, dismissed as duplicate of existing thread discussion_r3487509240. optimizer-rewrite independently reported the same stale test API issue and then marked it duplicate of MAIN-001; it found no additional optimizer/rewrite semantic issue. Convergence round 1 ended with both live subagents replying NO_NEW_VALUABLE_FINDINGS for the same current ledger/comment set.

@@ -66,12 +69,14 @@ class RuntimeFilterMergerTest : public RuntimeFilterTest {
merger->set_expected_producer_num(1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test file still calls the old RuntimeFilterMerger::set_expected_producer_num(...) helper, but the PR removed that member and replaced the production users with increase_expected_producer_num(...). The only remaining set_expected_producer_num references are the four calls in this file, so RuntimeFilterMergerTest will fail to compile once the BE UT target is built. Please update these calls to the new helper name, or keep a compatibility wrapper if the old API is still intended.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29797 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit a7f3ad4d37799ba872e6b4bc0466d9bf492f5ab4, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17674	4040	4045	4040
q2	2095	315	193	193
q3	10291	1480	831	831
q4	4678	477	339	339
q5	7539	872	586	586
q6	188	169	137	137
q7	764	852	634	634
q8	9334	1642	1625	1625
q9	5577	4586	4605	4586
q10	6787	1807	1545	1545
q11	448	271	242	242
q12	636	428	287	287
q13	18160	3366	2795	2795
q14	273	260	243	243
q15	q16	796	778	702	702
q17	1030	1001	1019	1001
q18	7435	5805	5541	5541
q19	1314	1359	1099	1099
q20	506	434	272	272
q21	6428	2902	2788	2788
q22	480	389	311	311
Total cold run time: 102433 ms
Total hot run time: 29797 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5081	4786	4800	4786
q2	332	363	232	232
q3	4938	5286	4735	4735
q4	2142	2184	1394	1394
q5	4776	4815	4701	4701
q6	232	176	125	125
q7	2038	1744	1594	1594
q8	2415	2161	2112	2112
q9	8083	7700	7592	7592
q10	4758	4663	4240	4240
q11	524	385	351	351
q12	733	738	524	524
q13	2986	3297	2757	2757
q14	267	279	251	251
q15	q16	681	708	621	621
q17	1320	1283	1280	1280
q18	7264	6735	6868	6735
q19	1105	1123	1106	1106
q20	2248	2280	1957	1957
q21	5350	4677	4622	4622
q22	530	466	401	401
Total cold run time: 57803 ms
Total hot run time: 52116 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 171230 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit a7f3ad4d37799ba872e6b4bc0466d9bf492f5ab4, data reload: false

query5	4311	641	488	488
query6	461	192	174	174
query7	4904	579	305	305
query8	352	188	166	166
query9	8756	4142	4090	4090
query10	460	313	283	283
query11	5942	2375	2186	2186
query12	162	103	98	98
query13	1244	603	433	433
query14	6268	5325	5025	5025
query14_1	4335	4330	4316	4316
query15	213	202	180	180
query16	1009	469	420	420
query17	944	713	571	571
query18	2464	472	343	343
query19	202	187	142	142
query20	112	107	103	103
query21	226	138	111	111
query22	13604	13617	13360	13360
query23	17418	16669	16131	16131
query23_1	16247	16316	16363	16316
query24	7730	1778	1302	1302
query24_1	1332	1309	1306	1306
query25	555	449	385	385
query26	1303	296	162	162
query27	2715	540	345	345
query28	4490	2033	2018	2018
query29	1100	614	489	489
query30	316	239	197	197
query31	1114	1087	961	961
query32	114	60	60	60
query33	560	326	241	241
query34	1203	1202	641	641
query35	771	774	673	673
query36	1391	1377	1225	1225
query37	159	124	95	95
query38	1889	1725	1676	1676
query39	933	909	878	878
query39_1	870	873	880	873
query40	220	123	100	100
query41	66	62	62	62
query42	90	89	95	89
query43	327	326	286	286
query44	1478	796	784	784
query45	228	211	175	175
query46	1078	1246	767	767
query47	2304	2340	2176	2176
query48	398	420	265	265
query49	579	425	312	312
query50	985	370	252	252
query51	4444	4420	4404	4404
query52	83	80	70	70
query53	249	260	190	190
query54	277	228	204	204
query55	78	75	66	66
query56	240	219	215	215
query57	1465	1407	1292	1292
query58	234	207	211	207
query59	1611	1683	1439	1439
query60	281	248	232	232
query61	157	158	154	154
query62	698	648	591	591
query63	233	191	203	191
query64	2542	797	663	663
query65	4855	4785	4788	4785
query66	1833	485	364	364
query67	28972	28880	28037	28037
query68	3200	1660	905	905
query69	425	326	292	292
query70	1118	1023	987	987
query71	291	239	219	219
query72	2909	2677	2354	2354
query73	832	781	436	436
query74	5163	4956	4798	4798
query75	2565	2564	2176	2176
query76	2331	1174	834	834
query77	368	379	294	294
query78	12549	12365	11802	11802
query79	1437	1198	799	799
query80	600	466	390	390
query81	450	280	251	251
query82	590	160	120	120
query83	364	269	244	244
query84	307	172	119	119
query85	890	518	409	409
query86	377	311	285	285
query87	1841	1839	1778	1778
query88	3762	2821	2770	2770
query89	434	384	330	330
query90	1955	180	191	180
query91	178	159	136	136
query92	65	62	56	56
query93	1513	1429	910	910
query94	543	306	275	275
query95	690	470	358	358
query96	1052	766	353	353
query97	2692	2679	2565	2565
query98	212	205	210	205
query99	1164	1175	1031	1031
Total cold run time: 257528 ms
Total hot run time: 171230 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.31 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit a7f3ad4d37799ba872e6b4bc0466d9bf492f5ab4, data reload: false

query1	0.01	0.00	0.01
query2	0.10	0.04	0.05
query3	0.26	0.13	0.13
query4	1.61	0.15	0.14
query5	0.27	0.22	0.22
query6	1.24	1.09	1.08
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.42	0.31	0.32
query10	0.56	0.56	0.57
query11	0.20	0.14	0.15
query12	0.19	0.15	0.14
query13	0.47	0.48	0.47
query14	1.03	1.00	1.02
query15	0.60	0.59	0.60
query16	0.33	0.33	0.32
query17	1.13	1.13	1.11
query18	0.24	0.21	0.21
query19	2.11	1.86	2.00
query20	0.03	0.01	0.01
query21	15.44	0.19	0.15
query22	4.99	0.05	0.05
query23	16.10	0.30	0.13
query24	2.98	0.42	0.33
query25	0.12	0.06	0.05
query26	0.87	0.21	0.16
query27	0.05	0.04	0.04
query28	3.46	0.92	0.54
query29	12.59	4.36	3.47
query30	0.28	0.16	0.15
query31	2.77	0.57	0.31
query32	3.23	0.59	0.50
query33	3.17	3.23	3.18
query34	15.70	4.24	3.55
query35	3.47	3.54	3.53
query36	0.61	0.43	0.43
query37	0.08	0.06	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 97.26 s
Total hot run time: 25.31 s

@BiteTheDDDDt

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29970 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit a7f3ad4d37799ba872e6b4bc0466d9bf492f5ab4, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17577	4124	4133	4124
q2	2021	320	198	198
q3	10342	1485	871	871
q4	4684	485	345	345
q5	7566	859	591	591
q6	186	182	143	143
q7	807	844	617	617
q8	9334	1791	1672	1672
q9	5628	4554	4535	4535
q10	6754	1809	1529	1529
q11	437	283	250	250
q12	640	446	311	311
q13	18067	3397	2777	2777
q14	279	265	242	242
q15	q16	786	794	712	712
q17	1034	969	1031	969
q18	7235	5859	5665	5665
q19	1304	1266	1049	1049
q20	502	407	277	277
q21	6589	3050	2779	2779
q22	445	371	314	314
Total cold run time: 102217 ms
Total hot run time: 29970 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5430	4931	5037	4931
q2	347	384	244	244
q3	4957	5305	4727	4727
q4	2168	2252	1396	1396
q5	5018	4728	4741	4728
q6	245	189	134	134
q7	1929	1785	1542	1542
q8	2637	2397	2273	2273
q9	8068	7689	7644	7644
q10	4744	4712	4168	4168
q11	565	384	359	359
q12	736	746	535	535
q13	3061	3351	2787	2787
q14	273	274	253	253
q15	q16	676	694	599	599
q17	1305	1289	1277	1277
q18	7266	6950	6985	6950
q19	1101	1089	1090	1089
q20	2234	2229	1954	1954
q21	5531	4776	4559	4559
q22	542	466	410	410
Total cold run time: 58833 ms
Total hot run time: 52559 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 172400 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit a7f3ad4d37799ba872e6b4bc0466d9bf492f5ab4, data reload: false

query5	4322	661	481	481
query6	420	195	172	172
query7	4813	602	300	300
query8	324	186	162	162
query9	8744	3994	4045	3994
query10	463	307	258	258
query11	5955	2365	2147	2147
query12	158	101	96	96
query13	1296	636	458	458
query14	6250	5230	4952	4952
query14_1	4289	4268	4258	4258
query15	214	205	182	182
query16	1005	452	432	432
query17	953	719	588	588
query18	2431	481	350	350
query19	203	189	148	148
query20	111	108	109	108
query21	224	145	122	122
query22	13552	13691	13420	13420
query23	17462	16606	16212	16212
query23_1	16298	16255	16233	16233
query24	7631	1834	1342	1342
query24_1	1338	1284	1281	1281
query25	572	464	395	395
query26	1310	311	163	163
query27	2745	559	344	344
query28	4476	2074	2046	2046
query29	1090	642	493	493
query30	314	236	202	202
query31	1116	1076	956	956
query32	106	62	60	60
query33	523	321	265	265
query34	1169	1149	659	659
query35	773	787	670	670
query36	1383	1371	1231	1231
query37	157	109	91	91
query38	1931	1717	1652	1652
query39	923	912	877	877
query39_1	869	876	872	872
query40	234	136	113	113
query41	66	69	61	61
query42	89	85	85	85
query43	329	332	286	286
query44	1425	793	780	780
query45	204	191	178	178
query46	1067	1244	751	751
query47	2383	2332	2216	2216
query48	372	403	312	312
query49	578	422	305	305
query50	1005	359	262	262
query51	4519	4451	4356	4356
query52	82	81	70	70
query53	254	270	194	194
query54	258	214	200	200
query55	72	70	63	63
query56	230	229	208	208
query57	1446	1407	1320	1320
query58	233	213	210	210
query59	1614	1663	1458	1458
query60	288	257	232	232
query61	163	158	156	156
query62	699	647	591	591
query63	230	204	190	190
query64	2546	760	604	604
query65	4837	4779	4789	4779
query66	1788	494	335	335
query67	29780	29641	29510	29510
query68	3302	1566	990	990
query69	411	297	255	255
query70	1066	1011	938	938
query71	289	239	216	216
query72	2926	2816	2551	2551
query73	825	844	435	435
query74	5140	4922	4764	4764
query75	2574	2545	2178	2178
query76	2315	1190	798	798
query77	357	387	280	280
query78	12497	12499	11883	11883
query79	1424	1217	754	754
query80	1267	457	391	391
query81	526	280	244	244
query82	623	155	119	119
query83	347	273	245	245
query84	316	146	117	117
query85	909	520	431	431
query86	418	294	282	282
query87	1838	1834	1743	1743
query88	3703	2792	2763	2763
query89	424	388	328	328
query90	1892	180	179	179
query91	170	163	135	135
query92	60	62	52	52
query93	1699	1517	912	912
query94	729	350	319	319
query95	676	478	337	337
query96	1070	830	330	330
query97	2695	2683	2604	2604
query98	222	208	200	200
query99	1172	1176	1022	1022
Total cold run time: 259033 ms
Total hot run time: 172400 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.05 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit a7f3ad4d37799ba872e6b4bc0466d9bf492f5ab4, data reload: false

query1	0.00	0.00	0.00
query2	0.09	0.05	0.05
query3	0.26	0.14	0.14
query4	1.61	0.14	0.14
query5	0.26	0.22	0.23
query6	1.27	1.08	1.04
query7	0.04	0.01	0.00
query8	0.06	0.04	0.04
query9	0.38	0.30	0.32
query10	0.55	0.54	0.53
query11	0.20	0.14	0.14
query12	0.19	0.15	0.14
query13	0.46	0.47	0.50
query14	1.02	1.01	1.00
query15	0.63	0.59	0.58
query16	0.32	0.33	0.32
query17	1.08	1.14	1.10
query18	0.23	0.21	0.21
query19	2.03	1.88	1.98
query20	0.02	0.01	0.01
query21	15.45	0.25	0.13
query22	4.73	0.05	0.05
query23	16.18	0.31	0.11
query24	2.97	0.40	0.32
query25	0.11	0.04	0.04
query26	0.72	0.20	0.16
query27	0.03	0.04	0.03
query28	3.56	0.90	0.52
query29	12.51	4.30	3.45
query30	0.28	0.15	0.17
query31	2.76	0.59	0.31
query32	3.22	0.59	0.49
query33	3.17	3.25	3.20
query34	15.64	4.21	3.51
query35	3.51	3.48	3.50
query36	0.56	0.44	0.43
query37	0.08	0.06	0.07
query38	0.05	0.04	0.03
query39	0.04	0.03	0.03
query40	0.17	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 96.61 s
Total hot run time: 25.05 s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev/4.0.x dev/4.1.x p0_b usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants